<template>
  <div></div>
</template>

<script setup>
import { reactive, ref, onMounted, onBeforeMount, getCurrentInstance, nextTick, watch, onBeforeUnmount } from "vue";
// import { getDicts } from "@/api/system";

// #region 字典获取
// 字典字段
const dictionary = ref(["home_question_classify", "sys_brushing_rule"]);

// 字典数据
const dictData = reactive({
  home_question_classify: [], // 视频类型
  sys_brushing_rule: [], // 防刷规则
  brush_less: [
    { dictValue: "1", dictLabel: "是" },
    { dictValue: "0", dictLabel: "否" }
  ],
  status_list: [
    { dictValue: "0", dictLabel: "禁用" },
    { dictValue: "1", dictLabel: "启用" }
  ],
  audit_status: [
    { dictValue: "1", dictLabel: "审核通过" },
    { dictValue: "2", dictLabel: "审核不通过" }
  ]
});

// 字典请求
const getDict = list => {
  list.forEach(element => {
    getDicts(element).then(res => {
      // console.log(res);
      dictData[element] = res.data;
    });
  });
};
// #endregion

onMounted(() => {
  // 获取字典数据
  getDict(dictionary.value);
});
</script>

<style lang="scss" scoped></style>
